<div class="push_wrap">
  <div class="row">
    <div class="push_title col-md-12 col-sm-12">
      <p>List.......</p>
    </div>
  </div>
  <div class="row">
    <div class="new_find">
      <div class="new_push">
        <div>
          <a (click)="onClickAdd()" class="btn btn-default">新建</a>
        </div>
      </div>
      <app-find></app-find>
    </div>
    <app-dialog #addDialog dialogId="modal-6" title="标题" (dialogListener)="dialogListener($event)">
      <div class="row">
        <div class="col-md-4">
          <div class="form-group">
            <label for="field-6" class="control-label">标题</label>
            <input type="text" class="form-control" name="push_title" placeholder="" [(ngModel)]="dataInput.title">
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-md-4">
          <div class="form-group">
            <label for="field-6" class="control-label">内容</label>
            <input type="text" class="form-control" name="push_content" placeholder="" [(ngModel)]="dataInput.view_type">
          </div>
        </div>
      </div>
    </app-dialog>
  </div>
  <div class="row">
    <table class="table table-bordered datatable" id="table-1">
      <thead>
        <tr>
          <th>
            <app-checkbox [checked]="isChecked(pp)" (checkeChange)="checkAll($event)"></app-checkbox>
          </th>
          <th data-hide="phone">ID</th>
          <th data-hide="phone,tablet">推送标题</th>
          <th data-hide="phone">推送时间</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        <tr class="odd" *ngFor='let pp of dataList | async'>
          <td>
            <app-checkbox [checked]="isChecked(pp)" (checkeChange)="onCheckChanged($event, pp)"></app-checkbox>
          </td>
          <td>{{pp.id}}</td>
          <td class="center">{{pp.title}}</td>
          <td class="center">{{(pp.create_time * 1000) | date : 'yyyy-MM-dd'}}</td>
          <td><button type="button" class="btn btn-white btn-default btn-xs" (click)="remove(pp)"><i class="entypo-trash"></i></button>
          <button type="button" class="btn btn-white btn-default btn-xs"  (click)="onClickchange(pp)"><i class="entypo-trash"></i></button>
          </td>
        </tr>
      </tbody>
    </table>
    <app-change #changeDialog changeId="modal-1" title="标题" (changeListener)="changeListener($event)">
      <div class="row">
        <div class="col-md-4">
          <div class="form-group">
            <label for="field-6" class="control-label">旧标题</label>
            <input type="text" class="form-control" name="push_title" placeholder="" value="{{oldtitle}}" >
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-md-4">
          <div class="form-group">
            <label for="field-6" class="control-label">新标题</label>
            <input type="text" class="form-control" name="push_content" placeholder="" [(ngModel)]='newdataInput.title'>
          </div>
        </div>
      </div>
    </app-change>
  </div>
  <app-num-page></app-num-page>
</div>